package com.qd.panda.dc.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;
import lombok.extern.slf4j.Slf4j;

/**
 * {
 * "connectorId": "000000000000000101",
 * "connectorStatus": 3,
 * "endTime": "2022-08-05 15:44:56",
 * "soc": 28,
 * "startChargeSeq": "MABQNB8QX202208051538357427",
 * "startChargeSeqStat": 4,
 * "startTime": "2022-08-05 15:38:35",
 * "stopReason": 1,
 * "sumPeriod": 0,
 * "totalElecMoney": 5.2,
 * "totalMoney": 7.8,
 * "totalPower": 5.2,
 * "totalSeviceMoney": 2.6
 * }
 * @author sjk
 */
@Data
@Accessors(chain = true)
@Slf4j
@ToString
public class DcOrderDTO {
    /**
     * 充电设备接口编码
     */
    private String connectorId;
    /**
     * 充电设备接口状态:1：空闲,2：占用（未充电）,3：占用（充电中）,4：占用（预约锁定）,255：故障
     */
    private Integer connectorStatus;
    /**
     * 充电结束时间
     */
    private String endTime;
    /**
     * 剩余电量
     */
    private Integer soc;
    /**
     * 订单号
     */
    private String startChargeSeq;
    /**
     * 充电订单状态:1：启动中,2：充电中,3：停止中,4：已结束,5：未知
     */
    private Integer startChargeSeqStat;
    /**
     * 充电开始时间
     */
    private String startTime;
    /**
     * 停止原因
     */
    private Integer stopReason;
    /**
     * 时段数N
     */
    private Integer sumPeriod;
    /**
     * 总电费
     */
    @JsonProperty("totalElecMoney")
    private Double totalElecMoney;
    /**
     * 累计总金额
     */
    private Double totalMoney;
    /**
     * 累计充电量
     */
    private Double totalPower;
    /**
     * 总服务费
     */
    @JsonProperty("totalSeviceMoney")
    private Double totalSeviceMoney;

    public void freeData() {
        this.connectorId = null;
        this.connectorStatus = null;
        this.endTime = null;
        this.stopReason = null;
        this.sumPeriod = null;
        this.totalElecMoney = null;
        this.totalMoney = null;
        this.totalPower = null;
        this.totalSeviceMoney = null;
    }
}
